package cn.jc.springframework.context.even;

import cn.jc.springframework.context.ApplicationContext;
import cn.jc.springframework.context.ApplicationEvent;

/**
 *
 * @Description: 为ApplicationContext引发的事件的基类。
 * @author: JC
 * @date: 2023/4/8 16:00
 */
public class ApplicationContextEvent extends ApplicationEvent {

    /**
     * Constructs a prototypical Event.
     *
     * @param source The object on which the Event initially occurred.
     * @throws IllegalArgumentException if source is null.
     */
    public ApplicationContextEvent(Object source) {
        super(source);
    }

    public final ApplicationContext getApplicationContext(){
        return (ApplicationContext) getSource();
    }

}
